//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - EntityName
// 1 - Properties
//===================================================================================

namespace App.Domain.Handlers {
    using App.Data;
    using App.Domain.Contracts;
    using App.Domain.Models;

    public class UpdateCertification {
        private readonly ICertificationRepository _certificationRepository;

        public UpdateCertification(ICertificationRepository certificationRepository) {
            _certificationRepository = certificationRepository;
        }

        public void Execute(ICreateCertificationCommand certificationForm) {
            var certification = certificationForm.ConvertToEntity();

            _certificationRepository.Update(certification);
        }
    }
}
